#ifndef MAINSCENE_H
#define MAINSCENE_H

#include <QWidget>
#include<QTimer>
#include"map.h"
#include"character.h"
#include"friends.h"
#include"money.h"
#include"start.h"
#include"startbutton.h"
#include <QMainWindow>
#include"goodmood.h"
#include"success.h"
#include<QSound>
QT_BEGIN_NAMESPACE
namespace Ui { class mainscene; }
QT_END_NAMESPACE

class mainscene : public QMainWindow
{
    Q_OBJECT

public:
    mainscene(QWidget *parent = nullptr);
    ~mainscene();
    void initscene();//初始化场景
    //定时器
    QTimer m_timer;
    //启动游戏
    void playgame();
    //更新元素坐标
    void updatePosition();
    //绘制
    void paintEvent(QPaintEvent *);
    //人物
    character m_duola;
    //地图对象
    map m_map;
    //鼠标移动
    void mouseMoveEvent(QMouseEvent*);
    //朋友出场
        void friendstoscene();
        //朋友数组
        friends m_friends[friends_num] ;
        //朋友出场间隔时间
        int recorder;
        //碰撞检测

        void collision();
     money num_money[money_num];
void pickmoney();
int point=0;
goodmood m_mood[mood_num];
goodmood m_premood[mood_num];
int p=0;


start m_startbutton;
startbutton m_button;
success m_win;
private:
    Ui::mainscene *ui;

};
#endif // MAINSCENE_H
